#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include "mxml.h"

int main(int argc, char *argv[])
{
    if(argc != 2)
    {
        printf("Argument error!");
    }
    
    FILE *fp = fopen(argv[1], "r");
    assert(fp);
    FILE *fpout = fopen("student_bak.xml", "w");
    assert(fpout);

    mxml_node_t *xml = xml_getParameters(fp);

    xml_node_print(xml->child); 

    if(xml != NULL)
        fprintf(fpout, "<%s>\n", xml->type.name);
    xml_putToFile(xml->child, fpout);

    xml_node_destroy(xml);
    
}













